package com.stox.services.data.downloader.manager.impl;

import com.stox.services.data.downloader.manager.ExchangeDownloadMetadataManager;
import com.stox.services.data.downloader.model.ExchangeDownloadMetadata;
import com.stox.services.data.downloader.repository.ExchangeDownloadMetadataRepository;

public class ExchangeDownloadMetadataManagerImpl implements ExchangeDownloadMetadataManager{
	
	public static final ExchangeDownloadMetadataManagerImpl INSTANCE = new ExchangeDownloadMetadataManagerImpl();
	
	private ExchangeDownloadMetadataManagerImpl() {
		
	}
	
	@Override
	public ExchangeDownloadMetadata findOne(Long exchangeId) {
		return ExchangeDownloadMetadataRepository.INSTANCE.findOne(exchangeId);
	}

	@Override
	public void save(ExchangeDownloadMetadata exchangeDownloadMetadata) {
		ExchangeDownloadMetadataRepository.INSTANCE.saveAndFlush(exchangeDownloadMetadata);
	}

}
